package cn.dy.sbo.dao;

import org.springframework.stereotype.Component;
import org.springside.modules.orm.hibernate.HibernateDao;

import cn.dy.sbo.api.UserDao;
import cn.dy.sbo.model.User;

@Component
public class UserDaoHibernate extends HibernateDao<User, Long> implements
        UserDao
{
    private final String BATCH_HQL = "update User set valid = ? where id = ?)";

    @Override
    public void updateValid(Long id, boolean valid)
    {
        super.batchExecute(BATCH_HQL, valid, id);
    }
}